import cv2 #opencv读取的格式是BGR
import matplotlib.pyplot as plt
import numpy as np 

img_path = "/Users/mac/Documents/Learning/LearningOpencv/datasets/1.jpg"
save_path = "/Users/mac/Documents/Learning/LearningOpencv/datasets/1_test.jpg"

img = cv2.imread(img_path)
print(img.shape)

b,g,r=cv2.split(img)
img=cv2.merge((b,g,r))

# cv2.namedWindow(
# )

cv2.imshow("b", b)
cv2.imshow("g", g)
cv2.imshow("r", r)
cv2.waitKey(0)

